<?php
	include ("../php/seguridad/moduloSeguridad.php");
	include ("../php/seguridad/funcionesSeguridad.php");
?>
<!DOCTYPE html>
<!--

TABLE OF CONTENTS.

Use search to find needed section.

===================================================================

|  1. $BODY                        |  Body                        |
|  2. $MAIN_NAVIGATION             |  Main navigation             |
|  3. $NAVBAR_ICON_BUTTONS         |  Navbar Icon Buttons         |
|  4. $MAIN_MENU                   |  Main menu                   |
|  5. $UPLOADS_CHART               |  Uploads chart               |
|  6. $EASY_PIE_CHARTS             |  Easy Pie charts             |
|  7. $EARNED_TODAY_STAT_PANEL     |  Earned today stat panel     |
|  8. $RETWEETS_GRAPH_STAT_PANEL   |  Retweets graph stat panel   |
|  9. $UNIQUE_VISITORS_STAT_PANEL  |  Unique visitors stat panel  |
|  10. $SUPPORT_TICKETS            |  Support tickets             |
|  11. $RECENT_ACTIVITY            |  Recent activity             |
|  12. $NEW_USERS_TABLE            |  New users table             |
|  13. $RECENT_TASKS               |  Recent tasks                |

===================================================================

-->


<!--[if IE 8]>         <html class="ie8"> <![endif]-->
<!--[if IE 9]>         <html class="ie9 gt-ie8"> <![endif]-->
<!--[if gt IE 9]><!--> <html class="gt-ie8 gt-ie9 not-ie"> <!--<![endif]-->
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<title>Ticket</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
	
	<meta name="author" content="Abel Chocano Gómez, Carlos del Prado Mota">

	<!-- Favicon -->
	<link rel="shortcut icon" type="image/x-icon" href="assets/images/miImg/favicon.ico" />


	<!-- Open Sans font from Google CDN -->
	<link href="http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300&subset=latin" rel="stylesheet" type="text/css">

	<!-- Pixel Admin's stylesheets -->
	<link href="assets/stylesheets/bootstrap.min.css" rel="stylesheet" type="text/css">
	<link href="assets/stylesheets/pixel-admin.min.css" rel="stylesheet" type="text/css">
	<link href="assets/stylesheets/widgets.min.css" rel="stylesheet" type="text/css">
	<link href="assets/stylesheets/pages.min.css" rel="stylesheet" type="text/css">
	<link href="assets/stylesheets/rtl.min.css" rel="stylesheet" type="text/css">
	<link href="assets/stylesheets/themes.min.css" rel="stylesheet" type="text/css">

	<!-- Plugin Tabla -->
	<link href="../javascripts/libs/jtable.2.4.0/themes/metro/blue/jtable.css" rel="stylesheet" type="text/css" />

	<!-- Nuestros CSS -->
	<link href="assets/stylesheets/miCSS/miCss_ticket.css" rel="stylesheet" type="text/css">

	<!-- Get jQuery from Google CDN -->
	<!--[if !IE]> -->
	<script type="text/javascript"> window.jQuery || document.write('<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js">'+"<"+"/script>"); </script>

	<!-- <![endif]-->
	<!--[if lte IE 9]>
		<script type="text/javascript"> window.jQuery || document.write('<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">'+"<"+"/script>"); </script>
	<![endif]-->

	<!-- Pixel Admin's javascripts -->
	<script src="assets/javascripts/bootstrap.min.js"></script>
	<script src="assets/javascripts/pixel-admin.min.js"></script>
	
	<script src="../javascripts/libs/jquery-ui-1.10.4/jquery-ui.js"></script>
	
	<!-- Nuestros scripts -->
	<script src="assets/javascripts/miJS/miJS_ticket.js" type="text/javascript"></script>
	<script src="assets/javascripts/miJS/miJS_signout.js" type="text/javascript" ></script>

	<!--[if lt IE 9]>
		<script src="assets/javascripts/ie.min.js"></script>
	<![endif]-->
</head>


<!-- 1. $BODY ======================================================================================
	
	Body

	Classes:
	* 'theme-{THEME NAME}'
	* 'right-to-left'      - Sets text direction to right-to-left
	* 'main-menu-right'    - Places the main menu on the right side
	* 'no-main-menu'       - Hides the main menu
	* 'main-navbar-fixed'  - Fixes the main navigation
	* 'main-menu-fixed'    - Fixes the main menu
	* 'main-menu-animated' - Animate main menu
-->
<body class="theme-silver main-menu-animated page-invoice">

<script>var init = [];</script>
<!-- Demo script --> <script src="assets/demo/demo.js"></script> <!-- / Demo script -->

<div id="main-wrapper">


<!-- 2. $MAIN_NAVIGATION ===========================================================================

	Main navigation
-->
	<div id="main-navbar" class="navbar navbar-inverse" role="navigation">
		<!-- Main menu toggle -->
		<button type="button" id="main-menu-toggle"><i class="navbar-icon fa fa-bars icon"></i><span class="hide-menu-text">HIDE MENU</span></button>
		
		<div class="navbar-inner">
			<!-- Main navbar header -->
			<div class="navbar-header">

				<!-- Logo -->
				<a href="panel-control.html" class="navbar-brand">
					<div class="panel_logo"><img alt="Cloud Cash Register" src="assets/images/miImg/logo_c2r.png";></div>
					Cloud Cash Register
				</a>

				<!-- Main navbar toggle -->
				<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#main-navbar-collapse"><i class="navbar-icon fa fa-bars"></i></button>

			</div> <!-- / .navbar-header -->

			<div id="main-navbar-collapse" class="collapse navbar-collapse main-navbar-collapse">
				<div>

					<div class="right clearfix">
						<ul class="nav navbar-nav pull-right right-navbar-nav">

<!-- 3. $NAVBAR_ICON_BUTTONS =======================================================================

							Navbar Icon Buttons

							NOTE: .nav-icon-btn triggers a dropdown menu on desktop screens only. On small screens .nav-icon-btn acts like a hyperlink.

							Classes:
							* 'nav-icon-btn-info'
							* 'nav-icon-btn-success'
							* 'nav-icon-btn-warning'
							* 'nav-icon-btn-danger' 
-->

							<li class="dropdown">
								<a href="#" class="dropdown-toggle user-menu" data-toggle="dropdown">
									<img src="assets/demo/avatars/1.jpg" alt="">
									<span><?php echo $_SESSION['nombreUsuario']?></span>
								</a>
								<ul class="dropdown-menu">
									<li><a href="#"><i class="dropdown-icon fa fa-cog"></i>&nbsp;&nbsp;Configuración</a></li>
									<li class="divider"></li>
									<li><a href="#" id="a_desconectar_sesion"><i class="dropdown-icon fa fa-power-off"></i>&nbsp;&nbsp;Desconectar</a></li>
									<input type="hidden" name="signout_desconexion_token_CSRF" id="signout_desconexion_token_CSRF" value="<?php echo generadorTokenAntiCSRF('form_desconexion')?>">
								</ul>
							</li>
						</ul> <!-- / .navbar-nav -->
					</div> <!-- / .right -->
				</div>
			</div> <!-- / #main-navbar-collapse -->
		</div> <!-- / .navbar-inner -->
	</div> <!-- / #main-navbar -->
<!-- /2. $END_MAIN_NAVIGATION -->


<!-- 4. $MAIN_MENU =================================================================================

		Main menu
		
		Notes:
		* to make the menu item active, add a class 'active' to the <li>
		  example: <li class="active">...</li>
		* multilevel submenu example:
			<li class="mm-dropdown">
			  <a href="#"><span class="mm-text">Submenu item text 1</span></a>
			  <ul>
				<li>...</li>
				<li class="mm-dropdown">
				  <a href="#"><span class="mm-text">Submenu item text 2</span></a>
				  <ul>
					<li>...</li>
					...
				  </ul>
				</li>
				...
			  </ul>
			</li>
-->
	<div id="main-menu" role="navigation">
		<div id="main-menu-inner">
			<div class="menu-content top" id="menu-content-demo">
				<!-- Menu custom content demo
					 CSS:        styles/pixel-admin-less/demo.less or styles/pixel-admin-scss/_demo.scss
					 Javascript: html/assets/demo/demo.js
				 -->
				<div>
					<div class="text-bg"><span class="text-slim">Bienvenido,</span><br><span class="text-semibold"><?php echo $_SESSION['nombreUsuario']?></span></div>

					<img src="assets/demo/avatars/1.jpg" alt="" class="">
					<div class="btn-group">
						<a href="#" class="btn btn-xs btn-primary btn-outline dark"><i class="fa fa-cog"></i></a>
						<a href="#" class="btn btn-xs btn-danger btn-outline dark" id="a_icono_desconectar_sesion"><i class="fa fa-power-off"></i></a>
					</div>
					<a href="#" class="close">&times;</a>
				</div>
			</div>
			<ul class="navigation">
				<li>
					<a href="panel-control.html"><i class="menu-icon fa fa-desktop"></i><span class="mm-text">Resumen del mes</span></a>
				</li>
				<li>
					<a href="ver-productos.html"><i class="menu-icon fa fa-th-list"></i><span class="mm-text">Productos</a>
				</li>
				<li>
					<a href="ver-empleados.html"><i class="menu-icon fa fa-users"></i><span class="mm-text">Empleados</a>
				</li>
				<li class="mm-dropdown">
					<a href="#"><i class="menu-icon fa fa-bar-chart-o"></i><span class="mm-text">Informes</a>
					<ul>
						<li>
							<a tabindex="-1" href="informes-ventas.html"><i class="menu-icon fa fa-shopping-cart"></i><span class="mm-text">Ventas</span></a>
						</li>
						<li>
							<a tabindex="-1" href="informes-devoluciones.html"><i class="menu-icon fa fa-trash-o"></i><span class="mm-text">Devoluciones</span></a>
						</li>
						<li>
							<a tabindex="-1" href="#"><i class="menu-icon fa fa-inbox"></i><span class="mm-text">Productos</span></a>
						</li>
						<li>
							<a tabindex="-1" href="#"><i class="menu-icon fa fa-user"></i><span class="mm-text">Empleados</span></a>
						</li>
						<li>
							<a tabindex="-1" href="informes-historico.html"><i class="menu-icon fa fa-list-alt"></i><span class="mm-text">Histórico</span></a>
						</li>
					</ul>
				</li>
				<li class="active">
					<a href="ticket.html"><i class="menu-icon fa fa-list-alt"></i><span class="mm-text">Ticket</span></a>
				</li>
				<li>
					<a href="#"><i class="menu-icon fa fa-cog"></i><span class="mm-text">Configuración</span></a>
				</li>
			</ul> <!-- / .navigation -->
			<div class="menu-content">
				<a href="#" class="btn btn-primary btn-block btn-outline dark" id="boton_panelizq_desconectar_sesion"><i class="fa fa-power-off"></i> Desconectar</a>
			</div>
		</div> <!-- / #main-menu-inner -->
	</div> <!-- / #main-menu -->
<!-- /4. $MAIN_MENU -->

<!-- CONTENIDO DE LA SECCIÓN -->

	<div id="content-wrapper">

		<div class="page-header">
			
<!-- Título de la sección y botones -->
			<div class="row">
				<!-- Page header, center on small screens -->
				<h1 class="col-xs-12 col-sm-4 text-center text-left-sm"><i class="fa fa-list-alt page-header-icon"></i>&nbsp;&nbsp;Ticket</h1>

				<div class="col-xs-12 col-sm-8">
					<div class="row">
						<hr class="visible-xs no-grid-gutter-h">
						<!-- "Iconos de añadir producto y exportar datos a excel-->

						<div class="pull-right col-xs-12 col-sm-auto"><a href="#" class="btn btn-success btn-labeled" id="boton_editar_ticket" style="width: 100%;"><span class="btn-label icon fa fa-edit"></span>Editar</a></div>

						<!-- Margin -->
						<div class="visible-xs clearfix form-group-margin"></div>

					</div>
				</div>
			</div>
		</div> <!-- / .page-header -->

		<div class="row">
			<div class="col-md-12">
				<!-- Javascript -->
				<div id="ticket"></div>
				<input type="hidden" name="ticket_token_CSRF" id="ticket_token_CSRF" value="<?php
					echo generadorTokenAntiCSRF('ticket')?>">
			</div>
		</div>

<!-- EDITAR TICKET-->
		<div class="row">
			<div class="col-sm-12">
				<div class="panel" id="formulario_editar_ticket" style="display: none;">
					<div class="panel-heading">
						<span class="panel-title">Editar Ticket</span>
						<div style="position:relative; float:right; "><a href="#" id="icono_cancelar_editar_ticket"><i class="fa fa-times text-danger text-lg"></i></a></div>
					</div>
					<div class="panel-body no-padding">

						<div class="wizard no-margin" id="wizard-forms">

							<!-- PASOS -->
							<div class="wizard-wrapper no-border">
								<ul class="wizard-steps">
									<!-- PASO 1: CABECERA Y PIE DE PÁGINA-->
									<li data-target="#wizard-cabecera-pie" >
										<span class="wizard-step-number">1</span>
										<span class="wizard-step-caption">
											Definir
											<span class="wizard-step-description">Cabecera y el pie del ticket</span>
										</span>
									</li>
									<!-- PASO 2: VISUALIZAR-->
									<li data-target="#wizard-vista-previa"> <!-- ! Remove space between elements by dropping close angle -->
										<span class="wizard-step-number">2</span>
										<span class="wizard-step-caption">
											Visualizar
											<span class="wizard-step-description">Vista previa del ticket</span>
										</span>
									</li>
									
								</ul> <!-- / .wizard-steps -->
							</div> <!-- / .wizard-wrapper -->
							<!-- / Steps -->

							<!-- Pages -->
							<div class="wizard-content panel no-margin no-border-hr no-border-b no-padding-hr">

								<!-- CABECERA Y PIE DE PÁGINA-->
								<form class="wizard-pane form-bordered" id="wizard-cabecera-pie" style="display: none;">

									<!-- Nombre del comercio -->
									<div class="form-group no-padding-t no-border-t panel-padding-h">
										<label for="nombre-comercio" class="col-md-2 control-label">Nombre</label>
										<div class="col-md-10">
											<input type="text" id="input-nombre-comercio" name="nombre-comercio" placeholder="Razón o denominación social..." class="form-control">
											<div id="contador-caracteres-nombre-comercio" class="limiter-label form-group-margin"> Caracteres restantes: <span class="limiter-count">48</span></div>
										</div>
									</div>

									<!-- CIF -->
									<div class="form-group panel-padding-h">
										<label for="cif" class="col-md-2 control-label">CIF/NIF</label>
										<div class="col-md-10">
											<input type="text" id="input-cif" name="cif" placeholder="Código o Número de Identificación Fiscal..." class="form-control">
											<div id="contador-caracteres-cif" class="limiter-label form-group-margin"> Caracteres restantes: <span class="limiter-count">9</span></div>
										</div>
									</div>

									<!-- Dirección -->
									<div class="form-group panel-padding-h">
										<label for="direccion" class="col-md-2 control-label">Dirección</label>
										<div class="col-md-10">
											<input type="text" id="input-direccion" name="direccion" placeholder="Calle, número..." class="form-control">
											<div id="contador-caracteres-direccion" class="limiter-label form-group-margin"> Caracteres restantes: <span class="limiter-count">64</span></div>
										</div>
									</div>

									<!-- Ciudad -->
									<div class="form-group panel-padding-h">
										<label for="ciudad" class="col-md-2 control-label">Ciudad</label>
										<div class="col-md-10">
											<input type="text" id="input-ciudad" name="ciudad" placeholder="Código postal, ciudad..." class="form-control">
											<div id="contador-caracteres-ciudad" class="limiter-label form-group-margin"> Caracteres restantes: <span class="limiter-count">64</span></div>
										</div>
									</div>

									<!-- Comentarios -->
									<div class="form-group panel-padding-h">
										<label for="comentarios" class="col-md-2 control-label">Comentarios</label>
										<div class="col-md-10">
											<textarea id="textarea-comentarios" name="comentarios" placeholder="«Gracias por su visita», «Que tenga un buen día», «Próxima apertura», «Inicio de las rebajas»..." rows="3" class="form-control"></textarea>
											<div id="contador-caracteres-comentarios" class="limiter-label form-group-margin"> Caracteres restantes: <span class="limiter-count">48</span></div>
										</div>
									</div>

									<hr>

									<div class="panel-padding-h">
										<button type="submit" class="btn btn-primary pull-right">Siguiente</button>
									</div>
								</form> <!-- / .wizard-pane -->
								<!-- / CABECERA Y PIE DE PÁGINA-->

								<!-- VISTA PREVIA -->
								<form class="wizard-pane form-bordered" id="wizard-vista-previa">
									<!-- Carga de imágenes -->
									<div id="vista-previa">
										<div class="col-sm-12">
											<div class="col-sm-3"></div>
											<div class="col-sm-6">
												<div class="panel invoice">
													<div class="invoice-header" style="padding-top: 10px; padding-bottom: 10px;">
														<div class="texto-centrado" id="div-nombre-comercio"><h1 class="h1-nombre-comercio"><b>VENTAPP</b></h1></div>
														<br>
														<div id="div-direccion">
															<h3 class="h3-small">C/ General pardiñas Nº70, 6ºB derecha</h3>
														</div>
														<div id="div-ciudad">
															<h3 class="h3-small">28006, Madrid</h3>
														</div>
														<div id="div-cif">
															<h3 class="h3-small">CIF/NIF: A11111111</h3>
														</div>
														<div id="div-fecha-hora">
															<h3 class="h3-small">08/07/2014   18:00   Id:0000025-1</h3>
														</div>
														<br>
														<div>
															<h3 class="h3-small">Tipo de operación: VENTA/DEVOLUCIÓN</h3>
														</div>
													</div> <!-- / .invoice-header -->
													<hr>
													<div class="invoice-table">
														<table>
															<thead>
																<tr>
																	<th>
																		Descripción
																	</th>
																	<th>
																		Uds
																	</th>
																	<th>
																		Total
																	</th>
																</tr>
															</thead>
															<tbody>
																<tr>
																	<td>
																		<div class="invoice-description">Producto 1</div>
																	</td>
																	<td>
																		<div class="invoice-description">1</div>
																	</td>
																	<td>
																		<div class="invoice-description">7,65 €</div>
																	</td>
																</tr>
																<tr>
																	<td>
																		<div class="invoice-description">Producto 2</div>
																	</td>
																	<td>
																		<div class="invoice-description">3</div>
																	</td>
																	<td>
																		<div class="invoice-description">10,55 €</div>
																	</td>
																</tr>
																<tr>
																	<td>
																		<div class="invoice-description">Producto 3</div>
																	</td>
																	<td>
																		<div class="invoice-description">4</div>
																	</td>
																	<td>
																		<div class="invoice-description">13,00 €</div>
																	</td>
																</tr>
															</tbody>
														</table>
													</div> <!-- / .invoice-table -->
													<hr>
													<hr>
													<hr>
													<hr>
													<div class="invoice-table" style="padding: 0px !important;">
														<h2 class="h2-importe-total"><b>TOTAL: 31,2 €</b></h2>
														<br>
														<br>
														<h3 class="h3-iva-incluido">I.V.A. incluido</h3>
													</div>
													<hr>
													<hr>
													<hr>
													<hr>
													<div class="invoice-header" style="padding-top: 10px; padding-bottom: 10px;">
														<div id="div-comentarios">
															<h2 class="h2-small">Gracias por su visita</h2>
														</div>
													</div> <!-- / .invoice-header -->
												</div> <!-- / .invoice -->
											</div>
											<div class="col-sm-3"></div>
									<!-- /5. $INVOICE_PAGE -->
										</div>
										
										<hr />

										<div class="pull-right panel-padding-h">
											<button type="button" class="btn wizard-prev-step-btn">Atrás</button>&nbsp;&nbsp;
											<button type="submit" class="btn btn-danger">Finalizar</button>
										</div>
									</div>
								</form> <!-- / .wizard-pane -->
								<!-- / VISTA PREVIA -->

							</div> <!-- / .wizard-content -->
							<!-- / Pages -->

						</div> <!-- / .wizard -->
					</div>
				</div>
			</div>
		</div><!-- / EDITAR TICKET -->

<!-- Ticket -->
		<div class="row">
			<div class="col-sm-12">
				<div id="ticket-actual">
					<div class="col-sm-2"></div>
					<div class="col-sm-8">
						<div class="alert alert-info">
									<button type="button" class="close" data-dismiss="alert">×</button>
									<strong>Recuerda!</strong> Puedes configurar el formato del ticket a tu gusto clickando sobre el botón Editar.
						</div>
					</div>
					<div class="col-sm-12">
						<div class="col-sm-3"></div>
						<div class="col-sm-6">
							<div class="panel invoice">
								<div class="invoice-header" style="padding-top: 10px; padding-bottom: 10px;">
									<div class="texto-centrado" id="div-nombre-comercio-ticket-almacenado"><h1 class="h1-nombre-comercio"><b>VENTAPP</b></h1></div>
									<br>
									<div id="div-direccion-ticket-almacenado">
										<h3 class="h3-small">C/ General pardiñas Nº70, 6ºB derecha</h3>
									</div>
									<div id="div-ciudad-ticket-almacenado">
										<h3 class="h3-small">28006, Madrid</h3>
									</div>
									<div id="div-cif-ticket-almacenado">
										<h3 class="h3-small">CIF/NIF: A11111111</h3>
									</div>
									<div id="div-fecha-hora-ticket-almacenado">
										<h3 class="h3-small">08/07/2014   18:00   Id:0000025-1</h3>
									</div>
									<br>
									<div>
										<h3 class="h3-small">Tipo de operación: VENTA/DEVOLUCIÓN</h3>
									</div>
								</div> <!-- / .invoice-header -->
								<hr>
								<div class="invoice-table">
									<table>
										<thead>
											<tr>
												<th>
													Descripción
												</th>
												<th>
													Uds
												</th>
												<th>
													Total
												</th>
											</tr>
										</thead>
										<tbody>
											<tr>
												<td>
													<div class="invoice-description">Producto 1</div>
												</td>
												<td>
													<div class="invoice-description">1</div>
												</td>
												<td>
													<div class="invoice-description">7,65 €</div>
												</td>
											</tr>
											<tr>
												<td>
													<div class="invoice-description">Producto 2</div>
												</td>
												<td>
													<div class="invoice-description">3</div>
												</td>
												<td>
													<div class="invoice-description">10,55 €</div>
												</td>
											</tr>
											<tr>
												<td>
													<div class="invoice-description">Producto 3</div>
												</td>
												<td>
													<div class="invoice-description">4</div>
												</td>
												<td>
													<div class="invoice-description">13,00 €</div>
												</td>
											</tr>
										</tbody>
									</table>
								</div> <!-- / .invoice-table -->
								<hr>
								<hr>
								<hr>
								<hr>
								<div class="invoice-table" style="padding: 0px !important;">
									<h2 class="h2-importe-total"><b>TOTAL: 31,2 €</b></h2>
									<br>
									<br>
									<h3 class="h3-iva-incluido">I.V.A. incluido</h3>
								</div>
								<hr>
								<hr>
								<hr>
								<hr>
								<div class="invoice-header" style="padding-top: 10px; padding-bottom: 10px;">
									<div id="div-comentarios-ticket-almacenado">
										<h2 class="h2-small">Gracias por su visita</h2>
									</div>
								</div> <!-- / .invoice-header -->
							</div> <!-- / .invoice -->
						</div>
						<div class="col-sm-3"></div>
				<!-- /5. $INVOICE_PAGE -->
					</div>
				</div>
			</div>
		</div>
	</div> <!-- / #content-wrapper -->

	<div id="main-menu-bg"></div>
</div> <!-- / #main-wrapper -->

</body>
</html>